package cn.damai.search.baseService.ipml;

import cn.damai.search.baseService.BaseItemSearchService;
import cn.damai.search.mapper.ItemSearchMapper;
import cn.damai.search.vo.ItemSearchVo;
import cn.damai.util.DubboUtil;
import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;


import java.util.List;
import java.util.Map;

@Component
@Service(version = DubboUtil.VRESION,group = DubboUtil.GROUP)
public class BaseItemSearchServiceIpml implements BaseItemSearchService {

    @Autowired
    private ItemSearchMapper itemSearchMapper;

    @Override
    public ItemSearchVo getItemsearchById(@RequestParam Long id) {
        return itemSearchMapper.getItemsearchById(id);
    }

    @Override
    public List<ItemSearchVo> getItemsearchListByMap(@RequestParam Map<String, Object> param) {
        return itemSearchMapper.getItemsearchListByMap(param);
    }

    @Override
    public Integer getItemsearchCountByMap(@RequestParam Map<String, Object> param) {
        return itemSearchMapper.getItemsearchCountByMap(param);
    }

    @Override
    public Integer insertItemsearch(@RequestParam ItemSearchVo itemSearchVo) {
        return itemSearchMapper.insertItemsearch(itemSearchVo);
    }

    @Override
    public Integer updateItemsearch(@RequestParam ItemSearchVo itemSearchVo) {
        return itemSearchMapper.updateItemsearch(itemSearchVo);
    }

    //自定义方法 - 商品分类
    @Override
    public List<ItemSearchVo> queryItemTypeGrouping(Map<String, Object> param) {
        return itemSearchMapper.queryItemTypeGrouping(param);
    }
    //自定义方法 - 城市
    @Override
    public List<ItemSearchVo> queryAreaGrouping(Map<String, java.lang.Object> param){
        return itemSearchMapper.queryAreaGrouping(param);
    }

    //自定义方法 - 商品子类
    @Override
    public List<ItemSearchVo> queryItemType2Grouping(Map<String, java.lang.Object> param){
        return itemSearchMapper.queryItemType2Grouping(param);
    }
}
